package defectsim.integrator.velocitylaw;


public class VelocityLawFactory {

	public enum VelocityLawType {
		Damping,
		ThermallyActivated,
		ThermalDamping
	}
	
	public static VelocityLaw createVelocityLaw(VelocityLawType velocityLawType) {
		switch (velocityLawType) {
		case Damping:
			return new DampingVelocity();
		case ThermallyActivated:
			return new ThermallyActivatedVelocity();
		case ThermalDamping:
			return new ThermalDampingVelocity();
		}
		throw new IllegalArgumentException("The velocity law type " + velocityLawType + " is not recognized.");
	}
}
